package com.lyy.service;

import com.lyy.entity.Product;
import io.seata.core.exception.TransactionException;
import org.springframework.stereotype.Service;

/**
 * @author Liangyaoyun
 */

public interface ProductService {
    /**
     * 扣减商品库存
     *
     * @param productId 商品实体
     * @param number    扣减数量
     */
    Long updateStock(Long productId, Long number) throws TransactionException;


    Product selectById(Long productId);
}